Bug: https://github.com/pocl/pocl/issues/810
avoids out-of-memory on 32-bit platforms with large caches and corecount
Gbp-Pq: Name issue-810.patch
/* safety margin - aligning pointers later (in kernel arg setup)
* may require more local memory than actual local mem size.
* TODO fix this */
- scheduler.local_mem_size = device->local_mem_size << 4;
+ scheduler.local_mem_size = device->local_mem_size + device->max_parameter_size * MAX_EXTENDED_ALIGNMENT;
for (i = 0; i < num_worker_threads; ++i)
{